<!DOCTYPE html>
<html>

<head>
  <title>首页</title>
  <link rel="stylesheet" href="/stylesheets/bootstrap.min.css" />
  <link rel="stylesheet" href="/stylesheets/bootstrap-theme.min.css" />
  <link rel='stylesheet' href='/stylesheets/style.css' />
</head>

<body>
  <div class="top clear">
  <%if (!username) {%>
    <div class="enter">
      <a href="/login">登录</a>
      <a href="/register">注册</a>
    </div>
  <%}else{%>
    <div class="enter">
      <%= username %>的账号
      <input type="button" value="退出" onclick="location.href='/logout'">
    </div> 
  <%}%>
  </div>
<!--头部-->
  <div class="header clear">
    <div class="logo">
      <img src="/images/logo_db.png" alt="">
    </div>
    <ul class="nav nav-pills">
      <li role="presentation" class="active"><a href="#">首页</a></li>
      <li role="presentation" ><a href="#in_theaters">正在热映</a></li>
      <li role="presentation"><a href="#coming_soon">即将上映</a></li>
      <li role="presentation" ><a href="#top250">Top250</a></li>
      <li role="presentation" ><a href="#us_box">北美票房榜</a></li>
    </ul>
  </div>


<h2 id="in_theaters">正在热映</h2>
<div class="top row">
  <div id="carousel-example-generic" class="carousel slide col-md-5" data-ride="carousel">
    <!-- Indicators -->
    <ol class="carousel-indicators">
      <li data-target="#carousel-example-generic" data-slide-to="0" class="active"></li>
      <li data-target="#carousel-example-generic" data-slide-to="1"></li>
      <li data-target="#carousel-example-generic" data-slide-to="2"></li>
      <li data-target="#carousel-example-generic" data-slide-to="3"></li>
      <li data-target="#carousel-example-generic" data-slide-to="4"></li>
    </ol>

    <!-- Wrapper for slides -->
    <div class="carousel-inner" role="listbox">
      <div class="item active">
        <a href="/details?id=<%= data[0][0].id %>"><img src="<%= data[0][0].images.large %>" alt="..."></a>
        <div class="carousel-caption">
        </div>
      </div>
      <div class="item">
       <a href="/details?id=<%= data[0][1].id %>"><img src="<%= data[0][1].images.large %>" alt="..."></a>
        <div class="carousel-caption">
          ...
        </div>
      </div>
      
      <div class="item">
        <a href="/details?id=<%= data[0][2].id %>"><img src="<%= data[0][2].images.large %>" alt="..."></a>
        <div class="carousel-caption">
          ...
        </div>
      </div>

      <div class="item">
        <a href="/details?id=<%= data[0][3].id %>"><img src="<%= data[0][3].images.large %>" alt="..."></a>
        <div class="carousel-caption">
          ...
        </div>
      </div>

      <div class="item">
        <a href="/details?id=<%= data[0][4].id %>"><img src="<%= data[0][4].images.large %>" alt="..."></a>
        <div class="carousel-caption">
          ...
        </div>
      </div>
    </div>

    <!-- Controls -->
    <a class="left carousel-control" href="#carousel-example-generic" role="button" data-slide="prev">
      <span class="glyphicon glyphicon-chevron-left" aria-hidden="true"></span>
      <span class="sr-only">Previous</span>
    </a>
    <a class="right carousel-control" href="#carousel-example-generic" role="button" data-slide="next">
      <span class="glyphicon glyphicon-chevron-right" aria-hidden="true"></span>
      <span class="sr-only">Next</span>
    </a>
  </div>
  <div class="col-md-7 description">
    <ul>
      
      <li>
        <img src="<%= data[0][5].images.medium %>" alt="">
        <a href="/details?id=<%= data[0][5].id %>"><%= data[0][5].title %></a>
      </li>
      <li>
        <img src="<%= data[0][6].images.medium %>" alt="">
        <a href="/details?id=<%= data[0][6].id %>"><%= data[0][6].title %></a>
      </li>
      <li>
        <img src="<%= data[0][7].images.medium %>" alt="">
        <a href="/details?id=<%= data[0][7].id %>"><%= data[0][7].title %></a>
      </li>
      <li>
        <img src="<%= data[0][8].images.medium %>" alt="">
        <a href="/details?id=<%= data[0][8].id %>"><%= data[0][8].title %></a>
      </li>
      <li>
        <img src="<%= data[0][9].images.medium %>" alt="">
        <a href="/details?id=<%= data[0][9].id %>"><%= data[0][9].title %></a>
      </li>
      <li>
        <img src="<%= data[0][10].images.medium %>" alt="">
        <a href="/details?id=<%= data[0][10].id %>"><%= data[0][10].title %></a>
      </li>
    </ul>
  </div>
</div>

 <h2 id="coming_soon">即将上映</h2>
<div class="top row">
  <div id="carousel-example-generic" class="carousel slide col-md-5" data-ride="carousel">
    <!-- Indicators -->
    <ol class="carousel-indicators">
      <li data-target="#carousel-example-generic" data-slide-to="0" class="active"></li>
      <li data-target="#carousel-example-generic" data-slide-to="1"></li>
      <li data-target="#carousel-example-generic" data-slide-to="2"></li>
      <li data-target="#carousel-example-generic" data-slide-to="3"></li>
      <li data-target="#carousel-example-generic" data-slide-to="4"></li>
    </ol>

    <!-- Wrapper for slides -->
    <div class="carousel-inner" role="listbox">
      <div class="item active">
        <a href="/details?id=<%= data[1][0].id %>"><img src="<%= data[1][0].images.large %>" alt="..."></a>
        <div class="carousel-caption">
        </div>
      </div>
      <div class="item">
       <a href="/details?id=<%= data[1][1].id %>"><img src="<%= data[1][1].images.large %>" alt="..."></a>
        <div class="carousel-caption">
          ...
        </div>
      </div>
      
      <div class="item">
        <a href="/details?id=<%= data[1][2].id %>"><img src="<%= data[1][2].images.large %>" alt="..."></a>
        <div class="carousel-caption">
          ...
        </div>
      </div>

      <div class="item">
        <a href="/details?id=<%= data[1][3].id %>"><img src="<%= data[1][3].images.large %>" alt="..."></a>
        <div class="carousel-caption">
          ...
        </div>
      </div>

      <div class="item">
        <a href="/details?id=<%= data[1][4].id %>"><img src="<%= data[1][4].images.large %>" alt="..."></a>
        <div class="carousel-caption">
          ...
        </div>
      </div>
    </div>

    <!-- Controls -->
    <a class="left carousel-control" href="#carousel-example-generic" role="button" data-slide="prev">
      <span class="glyphicon glyphicon-chevron-left" aria-hidden="true"></span>
      <span class="sr-only">Previous</span>
    </a>
    <a class="right carousel-control" href="#carousel-example-generic" role="button" data-slide="next">
      <span class="glyphicon glyphicon-chevron-right" aria-hidden="true"></span>
      <span class="sr-only">Next</span>
    </a>
  </div>
  <div class="col-md-7 description">
    <ul>
      <li>
        <img src="<%= data[1][5].images.medium %>" alt="">
        <a href="/details?id=<%= data[1][5].id %>"><%= data[1][5].title %></a>
      </li>
      <li>
        <img src="<%= data[1][6].images.medium %>" alt="">
        <a href="/details?id=<%= data[1][6].id %>"><%= data[1][6].title %></a>
      </li>
      <li>
        <img src="<%= data[1][7].images.medium %>" alt="">
        <a href="/details?id=<%= data[1][7].id %>"><%= data[1][7].title %></a>
      </li>
      <li>
        <img src="<%= data[1][8].images.medium %>" alt="">
        <a href="/details?id=<%= data[1][8].id %>"><%= data[1][8].title %></a>
      </li>
      <li>
        <img src="<%= data[1][9].images.medium %>" alt="">
        <a href="/details?id=<%= data[1][9].id %>"><%= data[1][9].title %></a>
      </li>
      <li>
        <img src="<%= data[1][10].images.medium %>" alt="">
        <a href="/details?id=<%= data[1][10].id %>"><%= data[1][10].title %></a>
      </li>
    </ul>
  </div>
</div>

<h2 id="top250">top250</h2>
<div class="top row">
  <div id="carousel-example-generic" class="carousel slide col-md-5" data-ride="carousel">
    <!-- Indicators -->
    <ol class="carousel-indicators">
      <li data-target="#carousel-example-generic" data-slide-to="0" class="active"></li>
      <li data-target="#carousel-example-generic" data-slide-to="1"></li>
      <li data-target="#carousel-example-generic" data-slide-to="2"></li>
      <li data-target="#carousel-example-generic" data-slide-to="3"></li>
      <li data-target="#carousel-example-generic" data-slide-to="4"></li>
    </ol>

    <!-- Wrapper for slides -->
    <div class="carousel-inner" role="listbox">
      <div class="item active">
        <a href="/details?id=<%= data[2][0].id %>"><img src="<%= data[2][0].images.large %>" alt="..."></a>
        <div class="carousel-caption">
        </div>
      </div>
      <div class="item">
       <a href="/details?id=<%= data[2][1].id %>"><img src="<%= data[2][1].images.large %>" alt="..."></a>
        <div class="carousel-caption">
          ...
        </div>
      </div>
      
      <div class="item">
        <a href="/details?id=<%= data[2][2].id %>"><img src="<%= data[2][2].images.large %>" alt="..."></a>
        <div class="carousel-caption">
          ...
        </div>
      </div>

      <div class="item">
        <a href="/details?id=<%= data[2][3].id %>"><img src="<%= data[2][3].images.large %>" alt="..."></a>
        <div class="carousel-caption">
          ...
        </div>
      </div>

      <div class="item">
        <a href="/details?id=<%= data[2][4].id %>"><img src="<%= data[2][4].images.large %>" alt="..."></a>
        <div class="carousel-caption">
          ...
        </div>
      </div>
    </div>

    <!-- Controls -->
    <a class="left carousel-control" href="#carousel-example-generic" role="button" data-slide="prev">
      <span class="glyphicon glyphicon-chevron-left" aria-hidden="true"></span>
      <span class="sr-only">Previous</span>
    </a>
    <a class="right carousel-control" href="#carousel-example-generic" role="button" data-slide="next">
      <span class="glyphicon glyphicon-chevron-right" aria-hidden="true"></span>
      <span class="sr-only">Next</span>
    </a>
  </div>
  <div class="col-md-7 description">
    <ul>
      <li>
        <img src="<%= data[2][5].images.medium %>" alt="">
        <a href="/details?id=<%= data[2][5].id %>"><%= data[2][5].title %></a>
      </li>
      <li>
        <img src="<%= data[2][6].images.medium %>" alt="">
        <a href="/details?id=<%= data[2][6].id %>"><%= data[2][6].title %></a>
      </li>
      <li>
        <img src="<%= data[2][7].images.medium %>" alt="">
        <a href="/details?id=<%= data[2][7].id %>"><%= data[2][7].title %></a>
      </li>
      <li>
        <img src="<%= data[2][8].images.medium %>" alt="">
        <a href="/details?id=<%= data[2][8].id %>"><%= data[2][8].title %></a>
      </li>
      <li>
        <img src="<%= data[2][9].images.medium %>" alt="">
        <a href="/details?id=<%= data[2][9].id %>"><%= data[2][9].title %></a>
      </li>
      <li>
        <img src="<%= data[2][10].images.medium %>" alt="">
        <a href="/details?id=<%= data[2][10].id %>"><%= data[2][10].title %></a>
      </li>
    </ul>
  </div>
</div>


<h2 id="us_box">北美票房榜</h2>
<div class="top row">
  <div id="carousel-example-generic" class="carousel slide col-md-5" data-ride="carousel">
    <!-- Indicators -->
    <ol class="carousel-indicators">
      <li data-target="#carousel-example-generic" data-slide-to="0" class="active"></li>
      <li data-target="#carousel-example-generic" data-slide-to="1"></li>
      <li data-target="#carousel-example-generic" data-slide-to="2"></li>
      <li data-target="#carousel-example-generic" data-slide-to="3"></li>
      <li data-target="#carousel-example-generic" data-slide-to="4"></li>
    </ol>

    <!-- Wrapper for slides -->
    <div class="carousel-inner" role="listbox">
      <div class="item active">
        <a href="/details?id=<%= data[3][0].subject.id %>"><img src="<%= data[3][0].subject.images.large %>" alt="..."></a>
        <div class="carousel-caption">
        </div>
      </div>
      <div class="item">
       <a href="/details?id=<%= data[3][1].subject.id %>"><img src="<%= data[3][1].subject.images.large %>" alt="..."></a>
        <div class="carousel-caption">
          ...
        </div>
      </div>
      
      <div class="item">
        <a href="/details?id=<%= data[3][2].subject.id %>"><img src="<%= data[3][2].subject.images.large %>" alt="..."></a>
        <div class="carousel-caption">
          ...
        </div>
      </div>

      <div class="item">
        <a href="/details?id=<%= data[3][3].subject.id %>"><img src="<%= data[3][3].subject.images.large %>" alt="..."></a>
        <div class="carousel-caption">
          ...
        </div>
      </div>

      <div class="item">
        <a href="/details?id=<%= data[3][4].subject.id %>"><img src="<%= data[3][4].subject.images.large %>" alt="..."></a>
        <div class="carousel-caption">
          ...
        </div>
      </div>
    </div>

    <!-- Controls -->
    <a class="left carousel-control" href="#carousel-example-generic" role="button" data-slide="prev">
      <span class="glyphicon glyphicon-chevron-left" aria-hidden="true"></span>
      <span class="sr-only">Previous</span>
    </a>
    <a class="right carousel-control" href="#carousel-example-generic" role="button" data-slide="next">
      <span class="glyphicon glyphicon-chevron-right" aria-hidden="true"></span>
      <span class="sr-only">Next</span>
    </a>
  </div>
  <div class="col-md-7 description">
    <ul>
      <li>
        <img src="<%= data[3][5].subject.images.medium %>" alt="">
        <a href="/details?id=<%= data[3][5].subject.id %>"><%= data[3][5].subject.title %></a>
      </li>
      <li>
        <img src="<%= data[3][6].subject.images.medium %>" alt="">
        <a href="/details?id=<%= data[3][6].subject.id %>"><%= data[3][6].subject.title %></a>
      </li>
      <li>
        <img src="<%= data[3][7].subject.images.medium %>" alt="">
        <a href="/details?id=<%= data[3][7].subject.id %>"><%= data[3][7].subject.title %></a>
      </li>
      <li>
        <img src="<%= data[3][8].subject.images.medium %>" alt="">
        <a href="/details?id=<%= data[3][8].subject.id %>"><%= data[3][8].subject.title %></a>
      </li>
      <li>
        <img src="<%= data[3][9].subject.images.medium %>" alt="">
        <a href="/details?id=<%= data[3][9].subject.id %>"><%= data[3][9].subject.title %></a>
      </li>
      <li>
        <img src="<%= data[3][10].subject.images.medium %>" alt="">
        <a href="/details?id=<%= data[3][10].subject.id %>"><%= data[3][10].subject.title %></a>
      </li>
    </ul>
  </div>
</div>

<!--底部-->
<footer class="footer ">
      <div class="container">
        <div class="row footer-top">
          <div class="col-sm-6 col-lg-6">
            <h4>
              <img src="/images/logo_db.png">
            </h4>
            <p>本网站所列电影列表都是<a href="http://www.douban.com/">豆瓣网</a>成员整理，并全部遵循 <a href="http://creativecommons.org/licenses/by/3.0/" target="_blank">CC BY 3.0</a>协议发布。</p>
          </div>
          <div class="col-sm-6  col-lg-5 col-lg-offset-1">
            <div class="row about">
              <div class="col-xs-3">
                <h4>关于</h4>
                <ul class="list-unstyled">
                  <li><a href="/about/">关于我们</a></li>
                  <li><a href="/ad/">广告合作</a></li>
                  <li><a href="/links/">友情链接</a></li>
                  <li><a href="/hr/">招聘</a></li>
                </ul>
              </div>
              <div class="col-xs-3">
                <h4>联系方式</h4>
                <ul class="list-unstyled">
                  <li><a href="http://weibo.com/douban" title="Bootstrap中文网官方微博" target="_blank">新浪微博</a></li>
                  <li><a href="mailto:admin@bootcss.com">电子邮件</a></li>
                </ul>
              </div>
              <div class="col-xs-3">
                <h4>旗下网站</h4>
                <ul class="list-unstyled">
                  <li><a href="http://www.golaravel.com/" target="_blank">Laravel中文网</a></li>
                  <li><a href="http://www.ghostchina.com/" target="_blank">Ghost中国</a></li>
                </ul>
              </div>
              <div class="col-xs-3">
                <h4>赞助商</h4>
                <ul class="list-unstyled">
                  <li><a href="http://www.ucloud.cn/" target="_blank">UCloud</a></li>
                  <li><a href="https://www.upyun.com" target="_blank">又拍云</a></li>
                </ul>
              </div>
            </div>
    
          </div>
        </div>
        <hr>
        <div class="row footer-bottom">
          <ul class="list-inline text-center">
            <li><a href="http://www.miibeian.gov.cn/" target="_blank">京ICP备11008151号</a></li><li>京公网安备11010802014853</li>
          </ul>
        </div>
      </div>
    </footer>

<script src="/js/jquery.js"></script>
<script src="/js/bootstrap.min.js"></script>
</body>

</html>